package principal;

/*
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;*/
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import recursos.Sesion;
import ventanas.FLogin;
import controlador.SeguridadController;

public class Principal {
	public static void main(String[] args) {
		cargarArchivoIni();
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				try {
					com.jtattoo.plaf.mcwin.McWinLookAndFeel.setCurrentTheme(Sesion.getTheme());
					UIManager.setLookAndFeel("com.jtattoo.plaf.mcwin.McWinLookAndFeel");
					FLogin login = new FLogin();
					login.setVisible(true);
					login.setLocationRelativeTo(null);
					SeguridadController controlador = new SeguridadController(
							login);
					login.setControlador(controlador);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	
	private static void cargarArchivoIni(){
		/*
		try {
			FileReader fr = new FileReader( new File("//SERVER2008/configuracion/config.ini"));
			BufferedReader br = new BufferedReader(fr);
			String linea;
			while((linea = br.readLine())!=null){
			String[] columnas = linea.split(";");
			Sesion.ipAS400 = columnas[0];
			Sesion.ipMSQL = columnas[1];
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}*/
	//	Sesion.ipAS400 = "190.81.173.50";
	//	Sesion.ipMSQL = "190.41.48.19:1433";
		Sesion.ipAS400 = "192.168.1.7";
		Sesion.ipMSQL = "SISTEMAS01PC\\SQLSERVER2008";
		//190.41.48.19:1433 - 192.168.1.5:1433
	}
} 
